package com.mbt.deal.api;

import com.mbt.deal.bean.BaseBean;
import com.mbt.deal.bean.BaseDataBean;
import com.mbt.deal.bean.BaseListBean;
import com.mbt.deal.bean.CoinListBean;
import com.mbt.deal.bean.CoinPriceBean;
import com.mbt.deal.bean.KLinebean;
import com.mbt.deal.bean.MessageBean;
import com.mbt.deal.bean.MessageDetailBean;
import com.mbt.deal.bean.NullBean;
import com.mbt.deal.bean.OrderBean;
import com.mbt.deal.bean.OrderListBean;
import com.mbt.deal.bean.TransActionRecordBean;
import com.mbt.deal.bean.UserCoinCount;
import com.mbt.deal.bean.UserInfoBean;

import java.util.Map;

import retrofit2.Converter;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import rx.Observable;

/**
 * @author Administrator
 * @createtime：2018/8/15 23:47
 */
public interface ApiServer {
    public String URL = " http://service.kantingyong.com/";
    public Converter.Factory FACTORY = AppGsonConverterFactory.create();

    @POST("coin/list")
    @FormUrlEncoded
    public Observable<BaseListBean<CoinListBean>> getCurrencyList(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinPrice/currentMaxMin")
    @FormUrlEncoded
    public Observable<BaseDataBean<CoinPriceBean>> getCoinPrice(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coin/getCoinCountByUser")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> getCoinCount(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinOrder/listByPage")
    @FormUrlEncoded
    public Observable<BaseListBean<OrderBean>> getorderList(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("userDeal/listByPage")
    @FormUrlEncoded
    public Observable<BaseListBean<TransActionRecordBean>> getTransactionList(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinOrder/listHisByPage")
    @FormUrlEncoded
    public Observable<BaseListBean<OrderListBean>> getOrderList(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinOrder/sendSell")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> goSaleOrder(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinOrder/sendBuy")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> goBuyOrder(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("userPwd/checkUserNumberPwd")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> checkPassword(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinOrder/buy")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> buyorder(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinOrder/sell")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> saleorder(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("user/addMon")
    @FormUrlEncoded
    public Observable<BaseDataBean<String>> recharge(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("user/getUser")
    @FormUrlEncoded
    public Observable<BaseDataBean<UserInfoBean>> getuserinfo(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("message/listByPage")
    @FormUrlEncoded
    public Observable<BaseListBean<MessageBean>> getmessages(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("message/detail")
    @FormUrlEncoded
    public Observable<BaseDataBean<MessageDetailBean>> getMessageDetail(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

    @POST("coinPrice/listByPage")
    @FormUrlEncoded
    public Observable<BaseListBean<KLinebean>> getPagePrice(@Header("mbtToken") String token, @FieldMap Map<String, Object> map);

}
